build: Don't use ld when cross-compiling
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 4 Nov 2021 13:41:35 +0000 (13:41 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 4 Nov 2021 13:41:35 +0000 (13:41 +0000)
We can't guarantee anything on the target toolchain, in that case.

gtk/meson.build

index e31b9e67ffca97e072441462e3f0d515974c341e..57e573a681b69f5064e545d03b7f67932806bedb 100644 (file)
@@ -872,7 +872,7 @@ endif
 
 ld = find_program('ld', required : false)
 
-if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
+if not meson.is_cross_build() and build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
   glib_compile_resources = find_program('glib-compile-resources')
 
   # Create the resource blob